小米平板4上的Debian Linux(Droidian)方便日常使用的一些设置 您所在的位置:网站首页 小米 刷linux 小米平板4上的Debian Linux(Droidian)方便日常使用的一些设置

小米平板4上的Debian Linux(Droidian)方便日常使用的一些设置

2023-11-20 02:09| 来源: 网络整理| 查看: 265

这篇文章是我为日常使用Droidian做的一些记录,可能有些不太准确,仅供参考!

通过usb线进行调试

droidian在devtools那个包中默认开启了usb网络,刷入devtool那个包后可以通过usb线ssh连接到我们的设备。

ssh [email protected] Postmarketos-Tweak

这是postmarketos项目弄的一个类似于gnome-tweak的小工具,可以用于切换phosh的gtk主题和一些外观,但是debian并没有打包这个软件,只能通过编译的形式进行安装。

sudo apt install libhandy-1-dev python3-pip meson git clone https://gitlab.com/postmarketOS/postmarketos-tweaks.git cd postmarketos-tweaks pip install pyyaml meson --prefix=/usr build cd build sudo ninja install libreoffice

libreoffice是唯一一个在wayland上支持比较好的office,wps即使用xwayland运行起来了也会有各种问题。但是libreoffice需要使用gtk3实现的前端来在phosh上正常工作。

sudo apt install libreoffice-gtk3 libreoffice libreoffice-l10n-zh-cn waydroid

一个外国大佬弄的一个wayland上高效的安卓模拟器,他可以驱动安卓模拟器里面例如相机、传感器这些硬件,而且可用性很强,但是不知道为什么在我的移植上一段时间后会导致整个lxc全部崩溃,然后phosh也用不了。。。。 安装过程如下,希望有大佬能够指点一下。

sudo apt install curl export DISTRO="bullseye" && sudo curl -# --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg && echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" > ~/waydroid.list && sudo mv ~/waydroid.list /etc/apt/sources.list.d/waydroid.list && sudo apt update && sudo apt dist-upgrade -y sudo apt install waydroid -y && sudo waydroid init sudo reboot 浏览器

火狐浏览器卸载移动模式的tweak

sudo apt remove firefox-esr-mobile-config

安装中文支持

sudo apt install firefox-esr-l10n-zh-cn

安装chromium

sudo apt install chromium-l10n chromium 输入法

在phosh上fcitx有一个很烦的bug,就是在原生wayland的应用上输入汉字时候选框出现会导致整个窗口消失。我也没办法了,只能凑合,反正输入中文的需求在这台电脑上不是很多。支持wayland的fcitx5我也试过,根本无法显示候选框,也许目前fcitx4是最好的输入法方案。

Xorg?

Droidian提供了libhybris的xorg驱动,所以可以使用基于xorg的桌面,但是经过我的测试,dm方面只有lxdm能用,而且整个画面有很强的撕裂感,不适合日常使用。

sudo apt install xorg xserver-xorg-video-hwcomposer lxdm xfce4 sudo systemctl stop phosh && sudo systemctl start lxdm

还要加一个conf文件,我这里有一个实现,仅供参考。 /etc/X11/xorg.conf.d/20-hwcomposer.conf

Section "Monitor" Identifier "Monitor0" # DisplaySize 136 68 # In millimeters - see physical_height/width in kernel sources (aeon_ssd2092_fhd_dsi_solomon.c - Cosmo) EndSection Section "Device" Identifier "SDM HWC" Driver "hwcomposer" Option "Rotate" "CW" EndSection Section "Screen" Identifier "Screen0" Device "SDM HWC" Monitor "Monitor0" # DefaultDepth 24 SubSection "Display" # Depth 24 #Virtual 1440 720 #Virtual 1080 540 EndSubSection EndSection

Droidian的gtk3是被魔改过的,gnome没有办法移动窗口,如果你想试试gnome可以降级到debian提供的版本,但是这个会破坏phosh的一部分功能。

sudo apt install libgtk-3-0=3.24.24-4 vscode很糊的问题

vscode默认以xwayland的形式运行,其实他原生是支持wayland的只需要加入一个参数就行,不过输入法就不能正常使用了。一个修改的例子如下所示。 /usr/share/applications/code.desktop

[Desktop Entry] Name=Visual Studio Code Comment=Code Editing. Redefined. GenericName=Text Editor Exec=/usr/share/code/code --unity-launch --enable-features=UseOzonePlatform --ozone-platform=wayland %F Icon=com.visualstudio.code Type=Application StartupNotify=false StartupWMClass=Code Categories=Utility;TextEditor;Development;IDE; MimeType=text/plain;inode/directory;application/x-code-workspace; Actions=new-empty-window; Keywords=vscode; X-Desktop-File-Install-Version=0.26 [Desktop Action new-empty-window] Name=New Empty Window Exec=/usr/share/code/code --new-window --enable-features=UseOzonePlatform --ozone-platform=wayland %F Icon=com.visualstudio.code

目前遇到的问题也就只有这么多了,尽管还是有很多bug,但是配上蓝牙键盘和鼠标就是一个很爽的编程机器,小米平板4 plus大概4个小时用30%的电(轻度浏览网页+vscode),arm在功耗方面做的还是很牛的。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有